package cn.com.zcode.exam.model;

import java.util.Date;

import cn.com.zcode.core.model.BaseModelSupport;

public class Answer extends BaseModelSupport {
	private static final long serialVersionUID = 1L;
	public static final int STATE_CANFIXED = -1;
	public static final int STATE_UNSURE = 1;
	private String userId;
	private String examId;
	private String questionId;
	private String userAnswer;
	private String corrAnswer;
	private Date answerDate;
	private int state;
	public boolean isCorrect() {
		return this.corrAnswer == this.userAnswer || this.corrAnswer != null && this.corrAnswer.equals(this.userAnswer);
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getExamId() {
		return examId;
	}

	public void setExamId(String examId) {
		this.examId = examId;
	}


	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}

	public String getUserAnswer() {
		return userAnswer;
	}

	public void setUserAnswer(String userAnswer) {
		this.userAnswer = userAnswer;
	}

	public String getCorrAnswer() {
		return corrAnswer;
	}

	public void setCorrAnswer(String corrAnswer) {
		this.corrAnswer = corrAnswer;
	}

	public Date getAnswerDate() {
		return answerDate;
	}

	public void setAnswerDate(Date answerDate) {
		this.answerDate = answerDate;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	 

}
